<!-- #region setup -->
<script lang="ts" setup>
import {BytButtonPopconfirm} from '@byt/components';

const asyncFn = () => {
   return new Promise(resolve => {
        setTimeout(()=>{
            resolve()
        }, 3000)
    }).then(res=>{
      // message.success('异步请求成功')
    })
}
</script>
<!-- #endregion setup -->

<!-- #region first -->
<BytButtonPopconfirm type="primary" loading @PositiveClick="asyncFn">
  <template #trigger>
    <n-button type="error">
      删除
    </n-button>
  </template>
    确定删除吗？
</BytButtonPopconfirm>
<!-- #endregion first -->
